﻿@model IEnumerable<CPRApp.Models.BookingModel>

@{
    ViewBag.Title = "Booking List";
}

<h2>BookList</h2>

<p>
    @Html.ActionLink("Create New", "BookCreate")
</p>
<table>
    <tr>
        <th>Book Id</th>
        <th>Book Date</th>
        <th>Customer</th>
        <th>Model</th>
        <th>Details</th>
        <th>Condition</th>
        <th>Est. Time</th>
        <th>Est Amount</th>
        <th>Issues</th>
        <th>In Warrenty</th>
        <th>Technicion</th>
        <th>Entered By</th>
        <th></th>
    </tr>
@if (Model != null)
{
    foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.BookingId)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ReceiptDate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CustomerName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ItemModel)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ItemDetails)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ItemCondition)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.EstimateDeliveryTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.EstimateBillAmount)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IssuesReported)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsInWarrenty)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Technicion)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.EnteredBy)
            </td>
            <td>
                @Html.ActionLink("Edit", "BookCreate", new { /* id=item.PrimaryKey */ }) |
                @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
            </td>
        </tr>
    }
}
</table>
